<?php
declare(strict_types=1);
/**
 * @project: 兔兔找图微信小程序
 * @author: kert
 * @date: 2023/5/22
 * @link: http://www.tiku-cloud.com/
 * @site: 微信搜索-兔兔找图
 */

namespace App\Logic\User\Service;

use App\Logic\User\Repository\Ai\AiGroupRepository;
use Closure;

class AiGroupService implements UserServiceInterface
{

    public static function searchWhere(array $requestParams): Closure
    {
        return function ($query) use ($requestParams) {
            $query->where("is_show", "1", 1);
        };
    }

    public function serviceSelect(array $requestParams): array
    {
        return (new AiGroupRepository)->repositorySelect(
            self::searchWhere($requestParams),
            (int)($requestParams["size"] ?? 20),
            ["uid", "title"]
        );
    }

    public function serviceCreate(array $requestParams): array
    {
        return [];
    }

    public function serviceUpdate(array $requestParams): array
    {
        return [];
    }

    public function serviceDelete(array $requestParams): int
    {
        return 0;
    }

    public function serviceFind(array $requestParams): array
    {
        return [];
    }
}
